package ch13;

import java.sql.Connection;
import java.sql.DriverManager;

public class JDBCFactory {
	private static String DB_URL = "jdbc:oracle:thin:@127.0.0.1:1521:XE";
	private static String DB_ID = "java";
	private static String DB_PW = "java";

	public static Connection getConnection() {
		Connection conn = null;
		try {
			Class.forName("oracle.jdbc.driver.OracleDriver");
			conn = DriverManager.getConnection(DB_URL,DB_ID,DB_PW);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return conn;
	}
}
